using System;
using System.Text;

namespace RealState.BusinessObjects
{
	[Serializable()]
	public class UserContents
	{
		private int _ContentId;

		public int ContentId
		{
			get { return _ContentId; }
			set { _ContentId = value; }
		}

		private string _FullName;

		public string FullName
		{
			get { return _FullName; }
			set { _FullName = value; }
		}

		private string _Position;

		public string Position
		{
			get { return _Position; }
			set { _Position = value; }
		}

		private string _Mobile;

		public string Mobile
		{
			get { return _Mobile; }
			set { _Mobile = value; }
		}

		private string _Email;

		public string Email
		{
			get { return _Email; }
			set { _Email = value; }
		}

		private string _Address;

		public string Address
		{
			get { return _Address; }
			set { _Address = value; }
		}

		public UserContents()
		{ }

		public UserContents(int ContentId,string FullName,string Position,string Mobile,string Email,string Address)
		{
			this.ContentId = ContentId;
			this.FullName = FullName;
			this.Position = Position;
			this.Mobile = Mobile;
			this.Email = Email;
			this.Address = Address;
		}

		public override string ToString()
		{
			return "ContentId = " + ContentId.ToString() + ",FullName = " + FullName + ",Position = " + Position + ",Mobile = " + Mobile + ",Email = " + Email + ",Address = " + Address;
		}

		public class ContentIdComparer : System.Collections.Generic.IComparer<UserContents>
		{
			public SorterMode SorterMode;
			public ContentIdComparer()
			{ }
			public ContentIdComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<UserContents> Membres
			int System.Collections.Generic.IComparer<UserContents>.Compare(UserContents x, UserContents y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.ContentId.CompareTo(x.ContentId);
				}
				else
				{
					return x.ContentId.CompareTo(y.ContentId);
				}
			}
			#endregion
		}
		public class FullNameComparer : System.Collections.Generic.IComparer<UserContents>
		{
			public SorterMode SorterMode;
			public FullNameComparer()
			{ }
			public FullNameComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<UserContents> Membres
			int System.Collections.Generic.IComparer<UserContents>.Compare(UserContents x, UserContents y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.FullName.CompareTo(x.FullName);
				}
				else
				{
					return x.FullName.CompareTo(y.FullName);
				}
			}
			#endregion
		}
		public class PositionComparer : System.Collections.Generic.IComparer<UserContents>
		{
			public SorterMode SorterMode;
			public PositionComparer()
			{ }
			public PositionComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<UserContents> Membres
			int System.Collections.Generic.IComparer<UserContents>.Compare(UserContents x, UserContents y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Position.CompareTo(x.Position);
				}
				else
				{
					return x.Position.CompareTo(y.Position);
				}
			}
			#endregion
		}
		public class MobileComparer : System.Collections.Generic.IComparer<UserContents>
		{
			public SorterMode SorterMode;
			public MobileComparer()
			{ }
			public MobileComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<UserContents> Membres
			int System.Collections.Generic.IComparer<UserContents>.Compare(UserContents x, UserContents y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Mobile.CompareTo(x.Mobile);
				}
				else
				{
					return x.Mobile.CompareTo(y.Mobile);
				}
			}
			#endregion
		}
		public class EmailComparer : System.Collections.Generic.IComparer<UserContents>
		{
			public SorterMode SorterMode;
			public EmailComparer()
			{ }
			public EmailComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<UserContents> Membres
			int System.Collections.Generic.IComparer<UserContents>.Compare(UserContents x, UserContents y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Email.CompareTo(x.Email);
				}
				else
				{
					return x.Email.CompareTo(y.Email);
				}
			}
			#endregion
		}
		public class AddressComparer : System.Collections.Generic.IComparer<UserContents>
		{
			public SorterMode SorterMode;
			public AddressComparer()
			{ }
			public AddressComparer(SorterMode SorterMode)
			{
				this.SorterMode = SorterMode;
			}
			#region IComparer<UserContents> Membres
			int System.Collections.Generic.IComparer<UserContents>.Compare(UserContents x, UserContents y)
			{
				if (SorterMode == SorterMode.Ascending)
				{
					return y.Address.CompareTo(x.Address);
				}
				else
				{
					return x.Address.CompareTo(y.Address);
				}
			}
			#endregion
		}
	}
}
